# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=stegsolve
pkgver=1.3
pkgrel=1
groups=('blackarch' 'blackarch-stego')
arch=('any')
pkgdesc='Steganography Solver.'
url='https://github.com/zardus/ctf-tools/blob/master/stegsolve/install'
license=('custom')
depends=('java-environment' 'bash')
source=('http://www.caesum.com/handbook/Stegsolve.jar')
noextract=('Stegsolve.jar')
sha512sums=('1bb0d4a6c0787381045b4ff28a9feafe548b29e105bef1f91ce38d244fda75c3e3b51c55b619da4f4d3ddc264f58a41194128f40a6eb54a0c3928cf6cc3f6b7e')

package() {
	install -dm 755 "$pkgdir/usr/bin"

  install -Dm 644 Stegsolve.jar "$pkgdir/usr/share/$pkgname/Stegsolve.jar"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec java -jar /usr/share/$pkgname/Stegsolve.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

